package com.houger.ddd.redpacket.infra.mq.kafka;

import jakarta.annotation.Resource;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

// 生产者
@Component
public class Producer {

	@Resource
	KafkaTemplate<String, String> kafkaTemplate;

	public void sendMessage(String topic, String message) {
		kafkaTemplate.send(topic, message);
	}
}
